package d1214;

public class practice {
    public static void main(String[] args) {
        test(new Employee() {
            @Override
            public void work() {
                System.out.println("好好工作");
            }

            @Override
            public void sleep() {
                System.out.println("呼呼大睡");
            }
        });

    }
    public static void test(Employee employee){
       employee.sleep();
       employee.work();
    }
}

interface  Employee{
    void work();
    void sleep();
}
